package com.hs.sfzy.util;

/**
 * @ClassName ResultUtil
 * @Description TODO
 * @Author QinKunPeng
 * @Date 2024年10月21日 11:55
 * @Version 1.0
 */
public class ResultUtil {
    public static QResult success(){
        QResult QResult = new QResult();
        return QResult.setStatus(ResultCode.OK.getCode()).setMessage(ResultCode.OK.getMsg());
    }

    public static QResult success(String msg){
        QResult QResult = new QResult();
        return QResult.setStatus(ResultCode.OK.getCode()).setMessage(msg);
    }

    public static QResult fail(){
        QResult QResult = new QResult();
        return QResult.setStatus(ResultCode.ERROR.getCode()).setMessage(ResultCode.ERROR.getMsg());
    }

    public static QResult fail(String msg){
        QResult QResult = new QResult();
        return QResult.setStatus(ResultCode.ERROR.getCode()).setMessage(msg);
    }
}
